package designPattern.DecoratorPattern.Decorator;

import designPattern.DecoratorPattern.Shape.Shape;

/**
 * fileName: RedShapeDecorator
 * description: ShapeDecorator 类的实体装饰类
 *
 * @author lihaogn-main
 * @version 1.0
 * @date 2019/9/12 15:02
 */
public class RedShapeDecorator extends ShapeDecorator {


    public RedShapeDecorator(Shape decoratedShape) {
        super(decoratedShape);
    }

    @Override
    public void draw() {
        decoratedShape.draw();
        setRedBorder(decoratedShape);
    }

    private void setRedBorder(Shape decorated) {
        System.out.println("边框设置为红色");
    }


}
